#pragma once

class CGameState;
class CCharacter;

class CMainCamera :
	public CD3DCamera
{
protected:
	CGameState *		m_pState;
	CCharacter *		m_pPlayer;

	FLOAT				m_CameraRotationX;
	FLOAT				m_CameraRotationY;
	FLOAT				m_CameraDistance;
public:
	CMainCamera(void);
	~CMainCamera(void);

	bool Init(CGameState * pState,CCharacter * pPlayer);
	void SetPlayer(CCharacter * pPlayer);
	virtual void Update(FLOAT Time);

	FLOAT GetCameraRotationX()
	{
		return m_CameraRotationX;
	}
	void SetCameraRotationX(FLOAT Value)
	{
		m_CameraRotationX=Value;
	}
	void IncCameraRotationX(FLOAT Value)
	{
		m_CameraRotationX+=Value;
	}


	FLOAT GetCameraRotationY()
	{
		return m_CameraRotationY;
	}
	void SetCameraRotationY(FLOAT Value)
	{
		m_CameraRotationY=Value;
	}
	void IncCameraRotationY(FLOAT Value)
	{
		m_CameraRotationY+=Value;
	}

	FLOAT GetCameraDistance()
	{
		return m_CameraDistance;
	}
	void SetCameraDistance(FLOAT Value)
	{
		m_CameraDistance=Value;
	}
	void IncCameraDistance(FLOAT Value)
	{
		m_CameraDistance+=Value;
		if(m_CameraDistance<0)
			m_CameraDistance=0;
	}
};
